import axios from '../../network/index'
import qs from "qs"

// 请求学生与班级数据
export function getDoorTimeList(params) {
    return axios.get('/accesscontrol/offline/downstatus/getDoorTimeList', params)
  }
//重新下载
export function getReDownload(params) {
    return axios.post('/accesscontrol/offline/downstatus/reDownload', qs.stringify(params))
  }
  //根据区域编号获设备列表
  export function getDeviceList(params) {
    return axios.get('/accesscontrol/cloud/offline/holiday/getDeviceList', params)
  } 
 
  //重下时段
  export function getDownload(params) {
    return axios.post('/accesscontrol/cloud/offline/holiday/reDownload', qs.stringify(params))
  } 
  //根据设备id获取假日
  export function getHoliday(params) {
    return axios.get('/accesscontrol/cloud/offline/holiday/getHoliday', params)
  } 
  //保存假日
  export function getSaveHoliday(params) {
    return axios.post('/accesscontrol/cloud/offline/holiday/saveHoliday', qs.stringify(params))
  } 
  //删除假日
  export function deleteHoliday(params) {
    return axios.post('/accesscontrol/cloud/offline/holiday/deleteHoliday', qs.stringify(params))
  } 
  //获取权限组列表
  export function getGroupList(params) {
    return axios.get('/accesscontrol/offline/groupConfig/getGroupList', params)
  } 
  //添加权限组
  export function getSaveGroup(params) {
    return axios.post('/accesscontrol/offline/groupConfig/saveGroup', qs.stringify(params))
  } 
  //删除权限组
  export function getDelGroup(params) {
    return axios.post('/accesscontrol/offline/groupConfig/delGroup', qs.stringify(params))
  } 
  //请求设备数据
  export function getGroupDevList(params) {
    return axios.get('/accesscontrol/offline/groupConfig/getGroupDevList', params)
  } 
  
  //从权限组删除设备
  export function delGroupDevice(params) {
    return axios.post('/accesscontrol/offline/groupConfig/delGroupDevice', qs.stringify(params))
  } 


  //根据区域编号获设备列表
   export function getDeviceTimeList(params) {
    return axios.post('/accesscontrol/cloud/offline/authorize/getDeviceTimeList', qs.stringify(params))
  } 
  //根据区域编号获取设备时段列表
  export function getDeviceTimeLists(params) {
    return axios.get('/accesscontrol/offline/authorize/getDeviceTimeList', params)
  } 
  
  //向权限组添加设备
  export function setGroupDevice(params) {
    return axios.post('/accesscontrol/offline/groupConfig/setGroupDevice', qs.stringify(params))
  } 



//获取授权列表
export function getAuthorizeList(params) {
  return axios.get('/accesscontrol/offline/authorize/getAuthorizeList', params)
} 
//确认下载
export function getreDownload(params) {
  return axios.post('/accesscontrol/offline/authorize/reDownload', qs.stringify(params))
} 
//获取权限组人员列表
export function getGroupManList(params) {
  return axios.get('/accesscontrol/offline/groupAccess/getGroupManList', params)
} 
//删除权限组人员
export function getdelGroupMan(params) {
  return axios.post('/accesscontrol/offline/groupAccess/delGroupMan', qs.stringify(params))
} 
//向权限组添加人员
export function getsetGroupMan(params) {
  return axios.post('/accesscontrol/offline/groupAccess/setGroupMan', qs.stringify(params))
} 

//获取权限组人员列表
export function AuthorizeList(params) {
  return axios.get('/accesscontrol/offline/authorizeByMan/getAuthorizeList', params)
} 
//删除授权
export function getdelAuthorize(params) {
  return axios.post('/accesscontrol/offline/authorizeByMan/delAuthorize', qs.stringify(params))
} 

//查询设备区域树
export function getDevAreaTree(params) {
  return axios.get('/accesscontrol/cloud/getDevAreaTree', params)
} 
//根据区域编号获设备列表
export function getimeDeviceList(params) {
  return axios.get('/accesscontrol/offline/timezone/getDeviceList', params)
} 
//下载
export function getcDownload(params) {
  return axios.post('/accesscontrol/offline/timezone/reDownload', qs.stringify(params))
}
//根据区域编号获设备列表
export function getLokDeviceList(params) {
  return axios.get('/accesscontrol/offline/timezone/getTimeZoneList',params)
}

//删除时段
export function deleteTimeZone(params) {
  return axios.post('/accesscontrol/offline/timezone/deleteTimeZone', qs.stringify(params))
}
//保存时段
export function saveTimeZone(params) {
  return axios.post('/accesscontrol/offline/timezone/saveTimeZone', qs.stringify(params))
}

//云门禁保存时段
export function saveTimeZones(params) {
  return axios.post('/accesscontrol/cloud/offline/timezone/saveTimeZone', qs.stringify(params))
}
//云门禁获取时段信息

export function getTimeZoneList(params) {
  return axios.get('/accesscontrol/cloud/offline/timezone/getTimeZoneList',params)
}
//云门禁删除时段
export function deleteTimeZones(params) {
  return axios.post('/accesscontrol/cloud/offline/timezone/deleteTimeZone', qs.stringify(params))
}
//保存授权
export function saveAuthorize(params) {
  return axios.post('/accesscontrol/offline/authorizeByMan/saveAuthorize', qs.stringify(params))
}

